<template>
  <!--明细表-->
  <div class="app-container">
    <el-form class="jc_search_wrap" v-model="searchList">
      <label>单晶编号</label><el-input v-model="searchList.crystalNo"></el-input>
      <label>刀号</label><el-input  v-model="searchList.incisionNo"></el-input>
      <!-- <label>时间</label>
      <el-input type="date" v-model="searchList.date1"></el-input>至<el-input type="date" v-model="searchList.date2"></el-input> -->
        <label style="width:100px">开始时间:</label>
          <!--v-if用于解决IE上的兼容性bug,https://github.com/ElemeFE/element/issues/8548 -->
              <el-date-picker
                v-model="startDate"
                type="datetime"
                placeholder="选择日期时间">
              </el-date-picker>
              <label style="width:100px">结束时间:</label>
              <el-date-picker
                v-model="endDate"
                type="datetime"
                placeholder="选择日期时间">
              </el-date-picker>

      <el-button @click="searchRows"><i class="el-icon-search"></i>查询</el-button>
      <el-button @click="exportRows"><i class="jc_icon "></i>导出</el-button>
    </el-form>
    <!--<el-button-group class="jc_btn_wrap jc_btn_left"></el-button-group>-->
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <el-tab-pane label="来料检验" name="first">
        <el-table :data="list_lailiao" :height="tableHeight-30" v-loading.body="listLoading" element-loading-text="拼命加载中" border fit highlight-current-row class="jc_table_wrap">
          <el-table-column type="selection" width="80px" fixed>
          </el-table-column>
          <el-table-column label='单晶编号' width="230" fixed>
            <template scope="scope">
              {{scope.row.crystalNo}}
        </template>
          </el-table-column>
          <el-table-column label='刀号' width="150" fixed>
            <template scope="scope">
              {{scope.row.incisionNo}}
            </template>
          </el-table-column>
          <el-table-column label='规格' width="180">
            <template scope="scope">
              {{scope.row.norms}}
        </template>
          </el-table-column>
          <el-table-column label='单晶长度(mm)' width="120">
            <template scope="scope">
              {{scope.row.length}}
        </template>
          </el-table-column>
          <el-table-column label='有效长度(mm)' width="120">
            <template scope="scope">
              {{scope.row.effectLength}}
        </template>
          </el-table-column>
          <el-table-column label='崩损/灰皮/楞崩(总和)(mm)' width="190">
            <template scope="scope">
              {{scope.row.theSum}}
        </template>
          </el-table-column>
          <el-table-column label='亮斑/水印' width="100">
            <template scope="scope">
              {{scope.row.brightWater}}
        </template>
          </el-table-column>
          <el-table-column label='电阻率T' width="100">
            <template scope="scope">
              {{scope.row.resistivity}}
            </template>
          </el-table-column>
          <el-table-column label='电阻率W' width="100">
            <template scope="scope">
              {{scope.row.feild1}}
            </template>
          </el-table-column>
          <el-table-column label='端面斜T' width="100">
            <template scope="scope">
              {{scope.row.sideT}}
        </template>
          </el-table-column>
          <el-table-column label='端面斜W' width="100">
            <template scope="scope">
              {{scope.row.sideW}}
        </template>
          </el-table-column>
          <el-table-column label='检验员' width="100">
            <template scope="scope">
              {{scope.row.inspecter}}
        </template>
          </el-table-column>
          <el-table-column label='检验时间' width="210">
            <template scope="scope">
              {{scope.row.inspectTime}}
        </template>
          </el-table-column>
          <el-table-column label='晶体灰皮' width="100">
            <template scope="scope">
              {{scope.row.crystalGrey}}
        </template>
          </el-table-column>
          <el-table-column label='晶片灰皮' width="100">
            <template scope="scope">
              {{scope.row.chipGrey}}
        </template>
          </el-table-column>
          <el-table-column label='线痕' width="100">
            <template scope="scope">
              {{scope.row.lineMark}}
        </template>
          </el-table-column>
          <el-table-column label='厂牌' width="100">
            <template scope="scope">
              {{scope.row.factoryCard}}
        </template>
          </el-table-column>
          <el-table-column label='导电型号' width="100">
            <template scope="scope">
              {{scope.row.electricModel}}
        </template>
          </el-table-column>
          <el-table-column label='拼接' width="100">
            <template scope="scope">
              {{scope.row.seams}}
        </template>
          </el-table-column>
          <el-table-column label='检验结果' width="100">
            <template scope="scope">
              {{scope.row.judge}}
        </template>
          </el-table-column>
          <el-table-column label='备注'  width="210">
            <template scope="scope">
              {{scope.row.remark}}
        </template>
          </el-table-column>
        </el-table>
        <el-pagination @size-change="handleSizeChange_lailiao" @current-change="changePage_lailiao" :current-page="currentPage_lailiao" :page-size="pageSize"
          layout="total, sizes, prev, pager, next, jumper" :total="total_lailiao"></el-pagination>
      </el-tab-pane>
      <el-tab-pane label="粘棒记录" name="second">
        <el-table :data="list_zhanbang"  :height="tableHeight-30"  border fit highlight-current-row class="jc_table_wrap">
          <el-table-column type="selection" width="80px" fixed>
          </el-table-column>
          <el-table-column label='单晶编号' width="230" fixed>
            <template scope="scope">
              {{scope.row.crystalNo}}
        </template>
          </el-table-column>
          <el-table-column label='刀号' width="150" fixed>
            <template scope="scope">
              {{scope.row.incisionNo}}
            </template>
          </el-table-column>
          <el-table-column label='单晶长度(mm)' width="130">
            <template scope="scope">
              {{scope.row.stickLength}}
        </template>
          </el-table-column>
          <el-table-column label='上料人' width="100">
            <template scope="scope">
              {{scope.row.chargeName}}
        </template>
          </el-table-column>
          <el-table-column label='上料时间' width="230">
            <template scope="scope">
              {{scope.row.chargeDate}}
        </template>
          </el-table-column>
          <el-table-column label='机台号' width="100">
            <template scope="scope">
              {{scope.row.machineNo}}
        </template>
          </el-table-column>
          <el-table-column label='树脂板厂家' width="100">
            <template scope="scope">
              {{scope.row.manufacturers}}
        </template>
          </el-table-column>
          <el-table-column label='树脂板颜色' width="100">
            <template scope="scope">
              {{scope.row.colour}}
        </template>
          </el-table-column>
          <el-table-column label='粘棒员' width="100">
            <template scope="scope">
              {{scope.row.stickName}}
        </template>
          </el-table-column>
          <el-table-column label='粘棒时间' width="230">
            <template scope="scope">
              {{scope.row.stickDate}}
        </template>
          </el-table-column>
          <el-table-column label='单晶粘接温度'  width="130">
            <template scope="scope">
              {{scope.row.temperature}}
        </template>
          </el-table-column>
          <el-table-column label='去胶员' width="100">
            <template scope="scope">
              {{scope.row.degummingName}}
        </template>
          </el-table-column>
          <el-table-column label='去胶时间'  width="230">
            <template scope="scope">
              {{scope.row.degummingDate}}
        </template>
          </el-table-column>
          <el-table-column label='坐料号' width="100">
            <template scope="scope">
              {{scope.row.liaoZuoNo}}
        </template>
          </el-table-column>
        </el-table>
        <el-pagination @size-change="handleSizeChange_zhanbang" @current-change="changePage_zhanbang" :current-page="currentPage_zhanbang"
          :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total_zhanbang"></el-pagination>
      </el-tab-pane>
      <el-tab-pane label="脱胶操作" name="third">
        <el-table :data="list_tuojiao"  :height="tableHeight-30"  border fit highlight-current-row class="jc_table_wrap">
          <el-table-column type="selection" width="80px" fixed>
          </el-table-column>
          <el-table-column label='单晶编号' fixed width="230" >
            <template scope="scope">
              {{scope.row.crystalNo}}
        </template>
          </el-table-column>
          <el-table-column label='刀号' width="150" fixed>
            <template scope="scope">
              {{scope.row.incisionNo}}
            </template>
          </el-table-column>
          <el-table-column label='脱胶机台号' width="100">
            <template scope="scope">
              {{scope.row.equipmentNo}}
        </template>
          </el-table-column>
          <el-table-column label='上料员' width="100">
            <template scope="scope">
              {{scope.row.upFeeder}}
        </template>
          </el-table-column>
          <el-table-column label='上料时间'  width="200">
            <template scope="scope">
              {{scope.row.upFeedtime}}
        </template>
          </el-table-column>
          <el-table-column label='料架号' width="100">
            <template scope="scope">
              {{scope.row.shelfNumber}}
        </template>
          </el-table-column>
          <el-table-column label='下料号' width="100">
            <template scope="scope">
              {{scope.row.downFeeder}}
        </template>
          </el-table-column>
          <el-table-column label='下料时间'   width="200">
            <template scope="scope">
              {{scope.row.downFeedtime}}
        </template>
          </el-table-column>
          <el-table-column label='下料自损' width="100">
            <template scope="scope">
              {{scope.row.downSelfloss}}
        </template>
          </el-table-column>
          <el-table-column label='周转箱号' width="100">
            <template scope="scope">
              {{scope.row.turnoverNo}}
        </template>
          </el-table-column>
          <el-table-column label='导电类型' width="100">
            <template scope="scope">
              {{scope.row.conductiveType}}
        </template>
          </el-table-column>
          <el-table-column label='厚片' width="100">
            <template scope="scope">
              {{scope.row.thickSlice}}
        </template>
          </el-table-column>
          <el-table-column label='换水刀次' width="100">
            <template scope="scope">
              {{scope.row.changewaterKnife}}
        </template>
          </el-table-column>
          <el-table-column label='气泡' width="100">
            <template scope="scope">
              {{scope.row.bubble}}
        </template>
          </el-table-column>
          <el-table-column label='崩损' width="100">
            <template scope="scope">
              {{scope.row.avalancheLoss}}
        </template>
          </el-table-column>
          <el-table-column label='线切掉片' width="100">
            <template scope="scope">
              {{scope.row.linecutDroppiece}}
        </template>
          </el-table-column>
          <el-table-column label='自检情况' width="100">
            <template scope="scope">
              {{scope.row.selfCheck}}
        </template>
          </el-table-column>
          <el-table-column label='色差' width="100">
            <template scope="scope">
              {{scope.row.chromatism}}
        </template>
          </el-table-column>
          <el-table-column label='线痕' width="100">
            <template scope="scope">
              {{scope.row.lineMark}}
        </template>
          </el-table-column>
          <el-table-column label='线切甩片' width="100">
            <template scope="scope">
              {{scope.row.linecutShed}}
        </template>
          </el-table-column>
          <el-table-column label='v型缺口' width="100">
            <template scope="scope">
              {{scope.row.vGap}}
        </template>
          </el-table-column>
          <el-table-column label='气孔' width="100">
            <template scope="scope">
              {{scope.row.stoma}}
        </template>
          </el-table-column>
          <el-table-column label='划痕' width="100">
            <template scope="scope">
              {{scope.row.scratch}}
        </template>
          </el-table-column>
          <el-table-column label='胶印' width="100">
            <template scope="scope">
              {{scope.row.offsetPrint}}
        </template>
          </el-table-column>
          <el-table-column label='脱胶棒长' width="100">
            <template scope="scope">
              {{scope.row.degumLength}}
        </template>
          </el-table-column>
          <el-table-column label='备注' width="200">
            <template scope="scope">
              {{scope.row.remark}}
        </template>
          </el-table-column>
        </el-table>
        <el-pagination @size-change="handleSizeChange_tuojiao" @current-change="changePage_tuojiao" :current-page="currentPage_tuojiao"
                       :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total_tuojiao"></el-pagination>
      </el-tab-pane>
      <el-tab-pane label="线切操作" name="fourth">
        <el-table :data="list_xianqie"  :height="tableHeight-30"  border fit highlight-current-row class="jc_table_wrap">
          <el-table-column type="selection" width="80px">
          </el-table-column>
          <el-table-column label='单晶编号' width="230px" fixed>
            <template scope="scope">
              {{scope.row.crystalNo}}
        </template>
          </el-table-column>
          <el-table-column label='刀号' width="150" fixed>
            <template scope="scope">
              {{scope.row.incisionNo}}
            </template>
          </el-table-column>
          <el-table-column label='棒长(mm)' width="100">
            <template scope="scope">
              {{scope.row.stickLength}}
        </template>
          </el-table-column>
          <el-table-column label='崩切段长度(mm)' width="120">
            <template scope="scope">
              {{scope.row.bengqieLength}}
        </template>
          </el-table-column>
          <el-table-column label='机台号' width="100">
            <template scope="scope">
              {{scope.row.machineNo}}
        </template>
          </el-table-column>
          <el-table-column label='领料员' width="100">
            <template scope="scope">
              {{scope.row.lingliaoName}}
        </template>
          </el-table-column>
          <el-table-column label='领料时间' width="200">
            <template scope="scope">
              {{scope.row.lingliaoDate}}
        </template>
          </el-table-column>
          <el-table-column label='理论出片数'  width="100">
            <template scope="scope">
              {{scope.row.theoretical}}
        </template>
          </el-table-column>
          <el-table-column label='全液第几刀'  width="100">
            <template scope="scope">
              {{scope.row.dijidao}}
        </template>
          </el-table-column>
          <el-table-column label='上料员'>
            <template scope="scope">
              {{scope.row.chargeName}}
        </template>
          </el-table-column>
          <el-table-column label='上料时间'  width="200">
            <template scope="scope">
              {{scope.row.chargeDate}}
        </template>
          </el-table-column>
          <el-table-column label='槽轮记录人' width="100">
            <template scope="scope">
              {{scope.row.caolunName}}
        </template>
          </el-table-column>
          <el-table-column label='槽轮记录时间'  width="200">
            <template scope="scope">
              {{scope.row.caolunDate}}
        </template>
          </el-table-column>
          <el-table-column label='槽轮厂家' width="100">
            <template scope="scope">
              {{scope.row.caolunManufacturers}}
        </template>
          </el-table-column>
          <el-table-column label='槽轮直径' width="100">
            <template scope="scope">
              {{scope.row.caolunDiameter}}
        </template>
          </el-table-column>
          <el-table-column label='槽轮系数' width="100">
            <template scope="scope">
              {{scope.row.caolunCoefficient}}
        </template>
          </el-table-column>
          <el-table-column label='槽轮/滑轮使用时间'  width="200">
            <template scope="scope">
              {{scope.row.caolunEmploy}}
        </template>
          </el-table-column>
          <el-table-column label='钢线记录人' width="100">
            <template scope="scope">
              {{scope.row.gangxianName}}
        </template>
          </el-table-column>
          <el-table-column label='钢线记录时间'  width="200">
            <template scope="scope">
              {{scope.row.gangxianDate}}
        </template>
          </el-table-column>
          <el-table-column label='钢线厂家' width="100">
            <template scope="scope">
              {{scope.row.gangxianManufacturers}}
        </template>
          </el-table-column>
          <el-table-column label='槽轮直径' width="100">
            <template scope="scope">
              {{scope.row.gangxianDiameter}}
        </template>
          </el-table-column>
          <el-table-column label='线网长度' width="100">
            <template scope="scope">
              {{scope.row.gangxianLength}}
        </template>
          </el-table-column>
          <el-table-column label='新线网使用刀次' width="120">
            <template scope="scope">
              {{scope.row.gangxianCount}}
        </template>
          </el-table-column>
          <el-table-column label='冷却液记录人'  width="120">
            <template scope="scope">
              {{scope.row.lengqueyeName}}
        </template>
          </el-table-column>
          <el-table-column label='冷却液记录时间'  width="200">
            <template scope="scope">
              {{scope.row.lengqueyeDate}}
        </template>
          </el-table-column>
          <el-table-column label='冷却液类型' width="100">
            <template scope="scope">
              {{scope.row.lengqueyeType}}
        </template>
          </el-table-column>
          <el-table-column label='冷却液量' width="100">
            <template scope="scope">
              {{scope.row.lengqueyeQuantity}}
        </template>
          </el-table-column>
          <el-table-column label='消泡剂' width="100">
            <template scope="scope">
              {{scope.row.lengqueyeDefoamer}}
        </template>
          </el-table-column>
          <el-table-column label='全液刀次' width="100">
            <template scope="scope">
              {{scope.row.lengqueyeCount}}
        </template>
          </el-table-column>
          <el-table-column label='下料员' width="100">
            <template scope="scope">
              {{scope.row.materialName}}
        </template>
          </el-table-column>
          <el-table-column label='下料时间'  width="200">
            <template scope="scope">
              {{scope.row.materialDate}}
        </template>
          </el-table-column>
          <el-table-column label='自损异常记录人'  width="120">
            <template scope="scope">
              {{scope.row.anomalyName}}
        </template>
          </el-table-column>
          <el-table-column label='自损异常记录时间'  width="200">
            <template scope="scope">
              {{scope.row.anomalyDate}}
        </template>
          </el-table-column>
          <el-table-column label='掉/碎片数' width="100">
            <template scope="scope">
              {{scope.row.anomalySuipian}}
        </template>
          </el-table-column>
          <el-table-column label='跳线根数' width="100">
            <template scope="scope">
              {{scope.row.anomalyTiaoxian}}
        </template>
          </el-table-column>
          <el-table-column label='切后剩余线量' width="120">
            <template scope="scope">
              {{scope.row.anomalyResidue}}
        </template>
          </el-table-column>
          <el-table-column label='头/尾部甩切厚度' width="120">
            <template scope="scope">
              {{scope.row.anomalyThickness}}
        </template>
          </el-table-column>
          <el-table-column label='异常描述'  width="200">
            <template scope="scope">
              {{scope.row.anomalyDescription}}
        </template>
          </el-table-column>
        </el-table>
        <el-pagination
          @size-change="handleSizeChange_xianqie"
          @current-change="changePage_xianqie"
          :current-page="currentPage_xianqie"
          :page-size="pageSize"
          layout="total, sizes, prev, pager, next, jumper"
          :total="total_xianqie">
        </el-pagination>
      </el-tab-pane>
      <el-tab-pane label="插片操作" name="fifth">
        <el-table :data="list_chapian"  :height="tableHeight-30"  border fit highlight-current-row class="jc_table_wrap" >
          <el-table-column type="selection" width="80px">
          </el-table-column>
          <el-table-column label='单晶编号' fixed width="230">
            <template scope="scope">
              {{scope.row.crystalNo}}
        </template>
          </el-table-column>
          <el-table-column label='刀号' width="150" fixed>
            <template scope="scope">
              {{scope.row.incisionNo}}
            </template>
          </el-table-column>
          <el-table-column label='插片机号'>
            <template scope="scope">
              {{scope.row.capianNo }}
        </template>
          </el-table-column>
          <el-table-column label='插片时间'>
            <template scope="scope">
              {{scope.row.capianDate }}
        </template>
          </el-table-column>
          <el-table-column label='插片裂片数'>
            <template scope="scope">
              {{scope.row.capianLiepian }}
        </template>
          </el-table-column>
          <el-table-column label='插片员'>
            <template scope="scope">
              {{scope.row.capianName }}
        </template>
          </el-table-column>
          <el-table-column label='插片机号'>
            <template scope="scope">
              {{scope.row.capianCount }}
        </template>
          </el-table-column>
          <el-table-column label='插片碎片数'>
            <template scope="scope">
              {{scope.row.capianSuipian }}
        </template>
          </el-table-column>
          <el-table-column label='备注'>
            <template scope="scope">
              {{scope.row.description }}
        </template>
          </el-table-column>
        </el-table>
        <el-pagination @size-change="handleSizeChange_chapian" @current-change="changePage_chapian" :current-page="currentPage_chapian"
          :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total_chapian"></el-pagination>
      </el-tab-pane>
      <el-tab-pane label="清洗操作" name="sixth">
        <el-table :data="list_qingxi"  :height="tableHeight-30"  border fit highlight-current-row class="jc_table_wrap">
          <el-table-column type="selection" width="80px">
          </el-table-column>
          <el-table-column label='单晶编号' fixed width="230">
            <template scope="scope">
              {{scope.row.crystalNo}}
        </template>
          </el-table-column>
          <el-table-column label='刀号' width="150" fixed>
            <template scope="scope">
              {{scope.row.incisionNo}}
            </template>
          </el-table-column>
          <el-table-column label='累计洗片数'>
            <template scope="scope">
              {{scope.row.count}}
        </template>
          </el-table-column>
          <el-table-column label='清洗自损'>
            <template scope="scope">
              {{scope.row.rinseDamage }}
        </template>
          </el-table-column>
          <el-table-column label='清洗时间'>
            <template scope="scope">
              {{scope.row.rinseDate }}
        </template>
          </el-table-column>
          <el-table-column label='清洗接片数量'>
            <template scope="scope">
              {{scope.row.rinseJiepian }}
        </template>
          </el-table-column>
          <el-table-column label='清洗员'>
            <template scope="scope">
              {{scope.row.rinseName }}
        </template>
          </el-table-column>
          <el-table-column label='清洗机台号'>
            <template scope="scope">
              {{scope.row.rinseNo  }}
        </template>
          </el-table-column>
          <el-table-column label='送验片数'>
            <template scope="scope">
              {{scope.row.songyan  }}
        </template>
          </el-table-column>
          <el-table-column label='备注'>
            <template scope="scope">
              {{scope.row.description }}
        </template>
          </el-table-column>
        </el-table>
        <el-pagination @size-change="handleSizeChange_qingxi" @current-change="changePage_qingxi" :current-page="currentPage_qingxi"
          :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total_qingxi"></el-pagination>
      </el-tab-pane>
      <el-tab-pane label="最终检验" name="seventh">
        <el-table :data="list_zuizhong"  :height="tableHeight-30"  border fit highlight-current-row class="jc_table_wrap">
          <el-table-column type="selection" width="80px">
          </el-table-column>
          <el-table-column label='操作'>
            <template scope="scope">
              <el-button type="text" @click="detailRow(scope.row.id)">详情</el-button>
            </template>
          </el-table-column>
          <el-table-column label='单晶编号' width="230" fixed>
            <template scope="scope">
              {{scope.row.crystalNo}}
        </template>
          </el-table-column>
          <el-table-column label='刀号' width="150" fixed>
            <template scope="scope">
              {{scope.row.incisionNo}}
            </template>
          </el-table-column>
          <el-table-column label='切割刀号'>
            <template scope="scope">
              {{scope.row.cutNo}}
        </template>
          </el-table-column>
          <el-table-column label='总送验数' >
            <template scope="scope">
              {{scope.row.sendcheckNum}}
        </template>
          </el-table-column>
          <el-table-column label='理论片数' >
            <template scope="scope">
              {{scope.row.theorySlice}}
        </template>
          </el-table-column>
          <el-table-column label='线径'>
            <template scope="scope">
              {{scope.row.lineDiameter}}
        </template>
          </el-table-column>
          <el-table-column label='槽轮系数' >
            <template scope="scope">
              {{scope.row.groovesRatio}}
        </template>
          </el-table-column>
          <el-table-column label='送验人' >
            <template scope="scope">
              {{scope.row.sendchecker}}
        </template>
          </el-table-column>
          <el-table-column label='送验时间' width="200">
            <template scope="scope">
              {{scope.row.sendchecktime}}
        </template>
          </el-table-column>
          <el-table-column label='接收人'>
            <template scope="scope">
              {{scope.row.picker}}
        </template>
          </el-table-column>
          <el-table-column label='接收时间' width="200">
            <template scope="scope">
              {{scope.row.picktime}}
        </template>
          </el-table-column>
        </el-table>
       <el-pagination @size-change="handleSizeChange_zuizhong" @current-change="changePage_zuizhong" :current-page="currentPage_zuizhong"
                      :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total_zuizhong"></el-pagination>
      </el-tab-pane>
    </el-tabs>

    <el-dialog  :visible.sync="dialogVisible"  center class="forms">
          <div class="app-container">
    <h1 style="text-align: center;">检验报告单</h1>
    <table class="jc_table jc_table_detail">
      <tr>
        <td>切割刀号</td>
        <td colspan="2">{{form.cutNo}}</td>
        <td>单晶编号</td>
        <td colspan="2">{{form.crystalNo}}</td>
        <td>货架号/层</td>
        <td>{{form.shelfNumber}}</td>
        <td>理论片数</td>
        <td>{{form.theorySlice}}</td>
        <td>线径</td>
        <td>{{form.lineDiameter}}</td>
        <td>槽轮系数</td>
        <td>{{form.groovesRatio}}</td>
      </tr>
      <tr>
        <td rowspan="2">清洗送检片数</td>
        <td>第1批</td>
        <td>第2批</td>
        <td>第3批</td>
        <td>第4批</td>
        <td>第5批</td>
        <td>第6批</td>
        <td>第7批</td>
        <td>第8批</td>
        <td>第9批</td>
        <td>总送验数</td>
        <td colspan="2">送验人/时间</td>
        <td></td>
      </tr>
      <tr>
        <td>{{form.sendcheck1}}</td>
        <td>{{form.sendcheck2}}</td>
        <td>{{form.sendcheck3}}</td>
        <td>{{form.sendcheck4}}</td>
        <td>{{form.sendcheck5}}</td>
        <td>{{form.sendcheck6}}</td>
        <td>{{form.sendcheck7}}</td>
        <td>{{form.sendcheck8}}</td>
        <td>{{form.sendcheck9}}</td>
        <td>{{form.sendcheckNum}}</td>
        <td colspan="2">送验人/时间</td>
        <td>{{form.sendchecker}}/{{form.sendchecktime}}</td>
      </tr>
      <tr>
        <td colspan="14" style="text-align: center;font-weight: 600">检验记录</td>
      </tr>
      <tr>
        <td rowspan="4">分选仪检验</td>
        <td class="font_bold">A(合格)</td>
        <td>崩</td>
        <td>脏</td>
        <td>尺寸</td>
        <td>厚度不良</td>
        <td>TTV</td>
        <td>翘曲度</td>
        <td>弯曲度</td>
        <td>缺口</td>
        <td>线痕</td>
        <td>孔</td>
        <td>隐裂</td>
        <td>测定不能</td>
      </tr>
      <tr>
        <td>{{form.apass}}</td>
        <td>{{form.chip}}</td>
        <td>{{form.dirt}}</td>
        <td>{{form.size}}</td>
        <td>{{form.thickbig}}</td>
        <td>{{form.ttv}}</td>
        <td>{{form.qiaoqudu}}</td>
        <td>{{form.wanqudu}}</td>
        <td>{{form.breakage}}</td>
        <td>{{form.roughness}}</td>
        <td>{{form.pinhole}}</td>
        <td>{{form.crack}}</td>
        <td>{{form.unmeasurable}}</td>
      </tr>
      <tr>
        <td class="font_bold">B(合格)</td>
        <td>A-</td>
        <td>倒篮</td>
        <td>叠片</td>
        <td>裂片</td>
        <td colspan="2" class="font_bold">操作员</td>
        <td colspan="2" class="font_bold">分选仪</td>
        <td colspan="2" class="font_bold">班组</td>
        <td colspan="2" class="font_bold">日期/时间</td>
      </tr>
      <tr>
        <td>{{form.bpass}}</td>
        <td>{{form.areduce}}</td>
        <td>{{form.daolan}}</td>
        <td>{{form.diepian}}</td>
        <td>{{form.fragment}}</td>
        <td colspan="2">{{form.fxyTester}}</td>
        <td colspan="2">{{form.fxyNo}}</td>
        <td colspan="2">{{form.fxyClass}}</td>
        <td colspan="2">{{form.fxyTime}}</td>
      </tr>
      <tr>
        <td class="font_bold">合格片数</td>
        <td colspan="6">{{form.passnum}}</td>
        <td colspan="2" class="font_bold">不合格片数</td>
        <td colspan="5">{{form.notpassnum}}</td>
      </tr>
      <tr>
        <td rowspan="4">外观检验</td>
        <td>粘胶面角崩</td>
        <td>粘胶面面崩</td>
        <td>入刀口角崩</td>
        <td>入刀口面崩</td>
        <td>脏</td>
        <td>花</td>
        <td>油污</td>
        <td>黑边</td>
        <td>水印</td>
        <td>胶</td>
        <td>线痕</td>
        <td>白斑</td>
        <td>皮带印</td>
      </tr>
      <tr>
        <td>{{form.zjmjb}}</td>
        <td>{{form.zjmmb}}</td>
        <td>{{form.rdkjb}}</td>
        <td>{{form.rdkmb}}</td>
        <td>{{form.zang}}</td>
        <td>{{form.hua}}</td>
        <td>{{form.youwu}}</td>
        <td>{{form.heibian}}</td>
        <td>{{form.shuiyin}}</td>
        <td>{{form.jiao}}</td>
        <td>{{form.xianhen}}</td>
        <td>{{form.baibang}}</td>
        <td>{{form.pidaiyin}}</td>
      </tr>
      <tr>
        <td>不平</td>
        <td>孔</td>
        <td>裂</td>
        <td>缺口</td>
        <td>立面黑</td>
        <td>划痕</td>
        <td>头尾</td>
        <td>灰皮</td>
        <td>色差</td>
        <td>亮边</td>
        <td>黑道</td>
        <td>检损</td>
        <td></td>
      </tr>
      <tr>
        <td>{{form.buping}}</td>
        <td>{{form.kong}}</td>
        <td>{{form.lie}}</td>
        <td>{{form.quekou}}</td>
        <td>{{form.limianhei}}</td>
        <td>{{form.huahen}}</td>
        <td>{{form.touwei}}</td>
        <td>{{form.huipi}}</td>
        <td>{{form.secha}}</td>
        <td>{{form.liangbian}}</td>
        <td>{{form.heidao}}</td>
        <td>{{form.jiansun}}</td>
        <td></td>
      </tr>
      <tr>
        <td rowspan="2">参数检验</td>
        <td>薄</td>
        <td>厚</td>
        <td>P高</td>
        <td>P低</td>
        <td>TTV</td>
        <td>WARP</td>
        <td>同心度异常</td>
        <td>其他</td>
        <td class="font_bold">检验员</td>
        <td class="font_bold" colspan="2">班组</td>
        <td class="font_bold" colspan="2">日期/时间</td>
      </tr>
      <tr>
        <td>{{form.bao}}</td>
        <td>{{form.hou}}</td>
        <td>{{form.pgao}}</td>
        <td>{{form.pdi}}</td>
        <td>{{form.csTtv}}</td>
        <td>{{form.csWarp}}</td>
        <td>{{form.csTxdyc}}</td>
        <td>{{form.qita}}</td>
        <td colspan="2">{{form.canshuTester}}</td>
        <td colspan="2">{{form.canshuClass}}</td>
        <td colspan="2">{{form.canshuTesttime}}</td>
      </tr>
      <tr>
        <td class="font_bold">合格片数</td>
        <td colspan="6">{{form.canshuHgps}}</td>
        <td colspan="2" class="font_bold">不合格片数</td>
        <td colspan="5">{{form.canshuBhgps}}</td>
      </tr>
      <tr>
        <td>备注</td>
        <td colspan="13">{{form.beizhu}}</td>
      </tr>
    </table>
  </div>
        <span slot="footer" class="dialog-footer">
            <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
        </span>
    </el-dialog>

  </div>
</template>

<script>
  import * as IQC from "../../api/report/incomeQualityControl";  //0来料检验
  import * as StickRecord from "../../api/report/stickRecord"; //粘棒
  import * as Degum from "../../api/report/degum";  //2粘棒记录
  import * as WireStick from "../../api/report/wireStick"; //线切
  import * as Illustration from "../../api/report/illustration"; //插片
  import * as Rinse from "../../api/report/rinse"; //清洗
  import * as Finaltest from "../../api/report/finaltest"; //最终检验

  var moment = require('moment');
  export default {
    components: {

    },
    data() {
      return {
        searchList: {pageSize: '',incisionNo: '',crystalNo: '',date1: '',date2: ''},
        list_lailiao: [],
        list_tuojiao: [],
        list_zhanbang: [],
        list_xianqie: [],
        list_chapian: [],
        list_qingxi: [],
        list_zuizhong: [],
        total_lailiao: 0,
        total_tuojiao: 0,
        total_zhanbang: 0,
        total_xianqie: 0,
        total_chapian: 0,
        total_qingxi: 0,
        total_zuizhong: 0,
        create_visible: false,
        detail_visible: false,
        edit_visible: false,
        dialogVisible:false,
        form: {},
        form_create: {},
        form_detail: {},
        form_edit: {},
        multipleSelection: [],
        crystalNo: '',
        date1: '',
        date2: '',
        startDate:'',
        endDate:'',
        import_visible: false,
        importInfo: false,
        isShow: false,
        pageSize: 10,
        currentPage_lailiao: 1,
        currentPage_zhanbang: 1,
        currentPage_tuojiao: 1,
        currentPage_xianqie: 1,
        currentPage_chapian: 1,
        currentPage_qingxi: 1,
        currentPage_zuizhong: 1,
        currentPage: 1,
        activeName: 'first',
      }

    },
    created() {
      // this.startDate = moment().subtract(1, 'days').format('YYYY-MM-DD 08:30:00');
      // this.endDate = moment().format('YYYY-MM-DD 08:30:00');
      // this.fetchData_lailiao();

    },
    methods: {
      detailRow(a){
          this.dialogVisible = true

          this.loadDetailTable(a)
      },
      loadDetailTable(a){
          Finaltest.detailRow(a).then(data => {
          this.form = data.msg;
        });
      },
      fetchData_lailiao(p=1) {
        this.listLoading = true;
        this.searchList.pageNum = this.currentPage_lailiao = p;
        this.searchList.pageSize = this.pageSize;
        IQC.getList(this.searchList).then(data => {
          this.list_lailiao = data.rows;
          this.total_lailiao = parseInt(data.total);
          this.listLoading = false;
        })
      },
      fetchData_zhanbang(p=1) {
        this.listLoading = true;
        this.searchList.pageNum = this.currentPage_zhanbang = p;
        this.searchList.pageSize = this.pageSize;
        StickRecord.getList(this.searchList).then(data => {
          this.list_zhanbang = data.rows;
          this.total_zhanbang = parseInt(data.total);
          this.listLoading = false;
        })

      },
      fetchData_tuojiao(p=1) {
        this.listLoading = true;
        this.searchList.pageNum = this.currentPage_tuojiao = p;
        this.searchList.pageSize = this.pageSize;
        Degum.getList(this.searchList).then(data => {
          this.list_tuojiao = data.rows;
          this.total_tuojiao = parseInt(data.total);
          this.listLoading = false;

        })
      },
      fetchData_xianqie(p=1) {
        this.listLoading = true;
        this.searchList.pageNum = this.currentPage_xianqie = p;
        this.searchList.pageSize = this.pageSize;
        WireStick.getList(this.searchList).then(data => {
          this.list_xianqie = data.rows;
          this.total_xianqie = parseInt(data.total);
          this.listLoading = false;
        })

      },
      fetchData_chapian(p=1) {
        this.listLoading = true;
        this.searchList.pageNum = this.currentPage_chapian = p;
        this.searchList.pageSize = this.pageSize;
        Illustration.getList(this.searchList).then(data => {
          this.list_chapian = data.rows;
          this.total_chapian = parseInt(data.total);
          this.listLoading = false;
        })

      },
      fetchData_qingxi(p=1) {
        this.listLoading = true;
        this.searchList.pageNum = this.currentPage_qingxi = p;
        this.searchList.pageSize = this.pageSize;
        Rinse.getList(this.searchList).then(data => {
          this.list_qingxi = data.rows;
          this.total_qingxi = parseInt(data.total);
          this.listLoading = false;
        })

      },
      fetchData_zuizhong(p=1) {
        this.listLoading = true;
        this.searchList.pageNum = this.currentPage_zuizhong = p;
        this.searchList.pageSize = this.pageSize;
        Finaltest.getList(this.searchList).then(data => {
          this.list_zuizhong = data.rows;
          this.total_zuizhong = parseInt(data.total);
          this.listLoading = false;
        })

      },
      handleClick(tab, event) {

        switch(tab.index) {
          case '0':  this.fetchData_lailiao();break;
          case '1':  this.fetchData_zhanbang();break;
          case '2':  this.fetchData_tuojiao();break;
          case '3':  this.fetchData_xianqie();break;
          case '4':  this.fetchData_chapian();break;
          case '5':  this.fetchData_qingxi();break;
          case '6':  this.fetchData_zuizhong();break;
        }
      },
      searchRows() {
        if( !this.startDate == ''){
          this.searchList.date1 = moment(this.startDate).format('YYYY-MM-DD HH:mm:ss');
        }else{
          this.searchList.date1 = ''
        }
        if(!this.endDate == ''){
            this.searchList.date2 = moment(this.endDate).format('YYYY-MM-DD HH:mm:ss');
        }else{
          this.searchList.date2 = ''
        }
        this.fetchData_lailiao();
        this.fetchData_tuojiao()
        this.fetchData_zhanbang()
        this.fetchData_xianqie()
        this.fetchData_chapian()
        this.fetchData_qingxi()
        this.fetchData_zuizhong()
      },
      changePage_lailiao(p) {
        this.fetchData_lailiao(p);
      },
      changePage_tuojiao(p) {
        this.fetchData_tuojiao(p)
      },
      changePage_zhanbang(p) {
        this.fetchData_zhanbang(p)
      },
      changePage_xianqie(p) {
        this.fetchData_xianqie(p)
      },
      changePage_chapian(p) {
        this.fetchData_chapian(p)
      },
      changePage_qingxi(p) {
        this.fetchData_qingxi(p)
      },
      changePage_zuizhong(p) {
        this.fetchData_zuizhong(p)
      },
      handleSizeChange_lailiao(val) {
        this.pageSize = val;
        this.currentPage_lailiao = 1;
        this.fetchData_lailiao(1);
      },
      handleSizeChange_tuojiao(val) {
        this.pageSize = val;
        this.currentPage = 1;
        this.fetchData_tuojiao(1);
      },
      handleSizeChange_zhanbang(val) {
        this.pageSize = val;
        this.currentPage = 1;
        this.fetchData_zhanbang(1);
      },
      handleSizeChange_xianqie(val) {
        this.pageSize = val;
        this.currentPage = 1;
        this.fetchData_xianqie(1);
      },
      handleSizeChange_chapian(val) {
        this.pageSize = val;
        this.currentPage = 1;
        this.fetchData_chapian(1);
      },
      handleSizeChange_qingxi(val) {
        this.pageSize = val;
        this.currentPage = 1;
        this.fetchData_qingxi(1);
      },
      handleSizeChange_zuizhong(val) {
        this.pageSize = val;
        this.currentPage = 1;
        this.fetchData_zuizhong(1);
      },
      exportRows() {
        // var time = moment().format('YYYY-MM-DD');
        //日期按照搜索结果导出
       //window.location.href=process.env.BASE_API+'/totalData/export?crystalNo='+this.searchList.crystalNo+'&incisionNo='+this.searchList.incisionNo+'&date1='+this.searchList.date1+'&date2='+this.searchList.date2;
       //导出当日的
       if(this.startdate === '' || this.endDate ==='' ){
           this.$message({
               type:"warning",
               message:'请选择时间'
           })
           return;
       }else{
            window.location.href=process.env.BASE_API+'/totalData/export?crystalNo='+this.searchList.crystalNo+'&incisionNo='+this.searchList.incisionNo+'&date1='+this.searchList.date1+'&date2='+this.searchList.date2;
       }

      },
    },
    computed: {
      tableHeight() {
        const filterHeight = 28
        var tableHeight = this.getTableHeight(filterHeight)
        return tableHeight;
      }
    },
    mounted () {
      /*var $this=this
        setTimeout(function(){
          console.log("work")
          $this.startDate = moment().subtract(1, 'days').format('YYYY-MM-DD 08:30:00');
          $this.endDate = moment().format('YYYY-MM-DD 08:30:00');
          $this.searchRows();
        },2000)*/
      this.startDate = moment.utc(moment().subtract(1, 'days').format('YYYY-MM-DD 00:30:00')).format();
      this.endDate = moment.utc(moment().format('YYYY-MM-DD 00:30:00')).format();
      this.searchRows();



    }
  }
</script>
<style >
.forms .el-dialog--small{
    width:1000px!important;
}
</style>
